home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
jjbqc.zip
/
JJBSHOW2.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-01-04
|
5KB
|
117 lines
/***************************************************************************
* *
* JJBSHOW2.C *
* *
* Copyright (c) 1989, JJB. All rights reserved. *
* *
* This example shows you how to assign functions to options. *
* *
* *
* 'funct(functionname)' *
* *
* *
* Just glance and it and move on to example JJBSHOW3.C *
* *
* If you want to run this program, from DOS: *
* *
* Enter 'JJBS2' ( to load this file with JJB.QLB) *
* Press 'F5' ( to compile and begin executing) *
* *
* If you have any problems, see JJBREAD.ME 'problems'. *
* Otherwise you should be executing this program. *
* *
* You may press 'ALT' then select any option. *
* The option selected will be displayed in the bottom left of screen. *
* *
* JJB, 9236 church Rd suite 1082, Dallas, Tx 75231 (214) 341-1635 *
***************************************************************************/
/***************************************************************************
* *
* To make an .exe file JJBSHOW2.EXE for this program, from DOS enter: *
* *
* QCL /c /AM JJBSHOW2.C *
* LINK JJBSHOW2.OBJ + JJB.OBJ,,, C:LIB\, *
* *
***************************************************************************/
#include "c:\bin\jjbset.h"
/* see JJBGLOSS.DOC for an explanation of the JJB functions below */
main()
{
jjb_initalize(); /* initalizes JJB */
jjb_setup(); /* setup options & assign functions */
jjb_start(); /* start executing the default option */
}
/* The function below uses some of the functions in the JJB hidden library.*/
video_message() {
vclrw(); /* clear the window */
vloc(10,20); /* position the video fast cursor */
vfsc("This message will appear on the screen.");
get_ch();
}
/****************************************************************************
* *
* jjb_setup() *
* *
* jjb_setup() is where you should define how your pull down menus will *
* for each group and option of the group. *
* *
* This example shows you how to assign function names to options. *
* *
****************************************************************************/
jjb_setup() {
group("Update");
option("Video a message on the screen");
funct(video_message);
option("Update Customer file",DRAWLINE);
option("Miscellaneous");
group("File");
option("Any option you want can be here");
option("Every group can have any number of options.");
group("More");
option("Call");
option("Create a new file");
option("These option descriptions");
option(" 's'how you that you can");
option(" 'n'ame each option.");
}